﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RTS
{
	public class Option
	{
		public const string Train = "Train";
		public const string Build = "Build";

		private string type;
		private Type parameter;

		public Option(string type, Type parameter)
		{
			this.type = type;
			this.parameter = parameter;
		}

		public void ExecuteAction(Building building)
		{
			if (type == Train)
			{
				((TrainingUnitsBuilding)building).train(parameter);
			}
			else if (type == Build)
			{
				((MainBuilding)building).build(parameter);
			}
		}

	}
}
